Skip to content

Comments

feat: extract chattermax-client library with public API (Phase 3.1, Task Group 4)#8

Merged
terraboops merged 2 commits intomainfrom
feature/phase3-task-group-3-message-routing
Feb 2, 2026
Merged

feat: extract chattermax-client library with public API (Phase 3.1, Task Group 4)#8
terraboops merged 2 commits intomainfrom
feature/phase3-task-group-3-message-routing

Conversation

@terraboops
Copy link
Owner

Summary

Extract the chattermax-client CLI into a reusable library crate with a public API suitable for Chibi integration.

Changes

  • Created ClientBuilder for ergonomic configuration (server, username, password, port, use_tls)
  • Implemented Client struct with methods: send_message, send_custom_message, join_room, leave_room, close
  • Created lib.rs exposing public API with re-exported core message types
  • Updated error handling to use library-specific ClientError types
  • Made Connection module internal (pub crate) with send_raw method
  • Added proper error variants for all failure modes

Test Results

  • ✅ 35 unit tests pass (15 core + 20 server)
  • ✅ Zero compiler warnings
  • ✅ Clippy passes with -D warnings
  • ✅ Code formatted with cargo fmt

Library Features

  • ClientBuilder::new(server, username, password) with optional port/tls
  • Client::send_message() for plain text communication
  • Client::send_custom_message() for all 12 XEP message types
  • Type-safe APIs preventing common errors
  • Complete re-exports to prevent dependency version conflicts

Ready for Chibi Integration

The library is now ready to be used as an embedded dependency by Chibi plugins, enabling seamless inter-agent messaging with structured message types.

… Group 3)

- Add custom_message_type field to HookFilter struct
- Implement extract_custom_message_type() for namespace detection
- Update matches_filter() to check custom types against expected types
- Add unit tests for custom type extraction and filtering (6 new tests)
- Add integration test for E2E custom type routing
- Fix clippy warnings in existing filter tests

Phase 3 Task Group 3 complete. Hook system now supports filtering
on all 12 custom XEP message types (thought, tool_call, tool_result,
todo, code_change, integration, review_comment, work_available,
question, answer, status_update, feature_complete) defined in Phase 3.1.

Test Results:
- 20 unit tests pass (chattermax-server)
- 1 integration test passes
- 15 chattermax-core tests pass
- Zero compiler warnings
- Clippy passes with -D warnings
- Code formatted with cargo fmt
- Created Client struct with async connect, send_message, send_custom_message
- Added ClientBuilder for ergonomic configuration
- Created lib.rs exposing public API with re-exported core types
- Updated error handling to use library-specific ClientError
- Made Connection module internal (pub(crate)) with send_raw method
- Prepared foundation for CLI to use library (Phase 3 Task Group 4)

Library features:
- ClientBuilder::new(server, username, password) with port/tls options
- Client::send_message() for plain text
- Client::send_custom_message() for 12 XEP types
- Client::join_room/leave_room/close for room management
- Graceful error handling with thiserror

Chibi integration ready: Library can be used as dependency to send/receive
structured inter-agent messages over XMPP.
@terraboops terraboops merged commit d054967 into main Feb 2, 2026
6 checks passed
terraboops added a commit that referenced this pull request Feb 3, 2026
…ask Group 4) (#8)

* feat: add custom message type filtering to hook system (Phase 3, Task Group 3)

- Add custom_message_type field to HookFilter struct
- Implement extract_custom_message_type() for namespace detection
- Update matches_filter() to check custom types against expected types
- Add unit tests for custom type extraction and filtering (6 new tests)
- Add integration test for E2E custom type routing
- Fix clippy warnings in existing filter tests

Phase 3 Task Group 3 complete. Hook system now supports filtering
on all 12 custom XEP message types (thought, tool_call, tool_result,
todo, code_change, integration, review_comment, work_available,
question, answer, status_update, feature_complete) defined in Phase 3.1.

Test Results:
- 20 unit tests pass (chattermax-server)
- 1 integration test passes
- 15 chattermax-core tests pass
- Zero compiler warnings
- Clippy passes with -D warnings
- Code formatted with cargo fmt

* feat: extract chattermax-client library with public API

- Created Client struct with async connect, send_message, send_custom_message
- Added ClientBuilder for ergonomic configuration
- Created lib.rs exposing public API with re-exported core types
- Updated error handling to use library-specific ClientError
- Made Connection module internal (pub(crate)) with send_raw method
- Prepared foundation for CLI to use library (Phase 3 Task Group 4)

Library features:
- ClientBuilder::new(server, username, password) with port/tls options
- Client::send_message() for plain text
- Client::send_custom_message() for 12 XEP types
- Client::join_room/leave_room/close for room management
- Graceful error handling with thiserror

Chibi integration ready: Library can be used as dependency to send/receive
structured inter-agent messages over XMPP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant